<template>
  <div id="addTask">
    <el-dialog
      :title="addShushuoTaskTitle"
      :visible="addSsTaskVisible"
      width="80%"
      :close-on-click-modal="windowModal"
      :modal="windowModal"
      @close="closeShushuoDialog"
    >
      <el-form :model="taskForm" :rules="rules" ref="taskForm" label-width="150px" class="demo-taskForm">
        <el-row>
          <el-col :span="15">
            <el-form-item label="任务名称" prop="taskName">
              <el-input v-model="taskForm.taskName" maxlength="30" placeholder="请输入任务名称" clearable show-word-limit></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-form-item label="平台" prop="platformCode">
            <el-select v-model="platformCode" placeholder="请选择">
              <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
            </el-select>
          </el-form-item>
        </el-row>
        <el-row>
          <el-col :span="15">
            <el-form-item label="门店" prop="storeCityList">
              <el-upload
                class="upload-demo"
                action=""
                accept=".xls,.xlsx"
                :before-upload="beforeUpload"
                :file-list="fileList"
                :http-request="selfHttpRequest"
                :show-file-list="showFileList"
              >
                <el-button size="small" type="primary">点击上传</el-button>
                <el-link type="primary" style="padding-left: 30px">模板下载</el-link>
                <!-- <div slot="tip" class="el-upload__tip">只能上传excel文件，且不超过500kb</div> -->
              </el-upload>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="20">
            <el-form-item label="门店列表">
              <div class="tag-group">
                <el-tag v-for="tag in storeCityListShow" :key="tag.storeName" effect="plain" size="medium">
                  {{ tag.city + '-' + tag.storeName }}
                </el-tag>
              </div>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="20">
            <el-form-item label="错误门店">
              <el-alert :title="errorStore" type="error"> </el-alert>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-form-item>
            <el-col :span="5">
              <el-button type="success" @click="publishShushuoTask('taskForm')" v-loading.fullscreen.lock="loading">发布</el-button>
            </el-col>
          </el-form-item>
        </el-row>
      </el-form>
    </el-dialog>
  </div>
</template>

<script>
import Index from './index.js';
export default Index;
</script>

<style></style>
